// ***********************************************************
//  CCsharpCounter.cpp - counter classes for C# code
//
//  REVISION  DATE      AUTHOR			MODIFICATION
//  Rev-1     Fall 07   WHH				Original author, CSSE
//  Rev-2     9/13/08   VN (Vu Nguyen)  Added CCsharpAspCounter::CCsharpAspCounter()
//                                        to support C# in ASP.NET
// ***********************************************************

#include "CCsharpCounter.h"

CCsharpCounter::CCsharpCounter()
{
	classtype = CSHARP;
	language_name = "C#";

	file_extension.push_back(".cs");

	flow_control_keywords.push_back("foreach");

	directive.push_back("import");
	directive.push_back("if");
	directive.push_back("else");
	directive.push_back("elif");
	directive.push_back("endif");
	directive.push_back("define");
	directive.push_back("undef");
	directive.push_back("error");
	directive.push_back("warning");
	directive.push_back("line");
	directive.push_back("region");
	directive.push_back("endregion");

	data_name_list.push_back("abstract");
	data_name_list.push_back("abstract");
	data_name_list.push_back("bool");
	data_name_list.push_back("byte");
	data_name_list.push_back("char");
	data_name_list.push_back("class");
	data_name_list.push_back("const");
	data_name_list.push_back("decimal");
	data_name_list.push_back("delegate");
	data_name_list.push_back("double");
	data_name_list.push_back("enum");
	data_name_list.push_back("event");
	data_name_list.push_back("explicit");
	data_name_list.push_back("extern");
	data_name_list.push_back("float");
	data_name_list.push_back("implicit");
	data_name_list.push_back("int");
	data_name_list.push_back("interface");
	data_name_list.push_back("internal");
	data_name_list.push_back("long");
	data_name_list.push_back("namespace");
	data_name_list.push_back("object");
	data_name_list.push_back("operator");
	data_name_list.push_back("override");
	data_name_list.push_back("private");
	data_name_list.push_back("protected");
	data_name_list.push_back("public");
	data_name_list.push_back("readonly");
	data_name_list.push_back("sbyte");
	data_name_list.push_back("sealed");
	data_name_list.push_back("short");
	data_name_list.push_back("static");
	data_name_list.push_back("string");
	data_name_list.push_back("struct");
	data_name_list.push_back("uint");
	data_name_list.push_back("ulong");
	data_name_list.push_back("unsafe");
	data_name_list.push_back("ushort");
	data_name_list.push_back("virtual");
	data_name_list.push_back("void");
	data_name_list.push_back("volatile");

	exec_name_list.push_back("goto");
	exec_name_list.push_back("as");
	exec_name_list.push_back("base");
	exec_name_list.push_back("break");
	exec_name_list.push_back("case");
	exec_name_list.push_back("catch");
	exec_name_list.push_back("checked");
	exec_name_list.push_back("continue");
	exec_name_list.push_back("default");
	exec_name_list.push_back("do");
	exec_name_list.push_back("else");
	exec_name_list.push_back("finally");
	exec_name_list.push_back("fixed");
	exec_name_list.push_back("for");
	exec_name_list.push_back("foreach");
	exec_name_list.push_back("goto");
	exec_name_list.push_back("if");
	exec_name_list.push_back("lock");
	exec_name_list.push_back("new");
	exec_name_list.push_back("return");
	exec_name_list.push_back("sizeof");
	exec_name_list.push_back("stackalloc");
	exec_name_list.push_back("switch");
	exec_name_list.push_back("this");
	exec_name_list.push_back("throw");
	exec_name_list.push_back("try");
	exec_name_list.push_back("typeof");
	exec_name_list.push_back("unchecked");
	exec_name_list.push_back("while");

	math_func_list.push_back("abs");
	math_func_list.push_back("acos");
	math_func_list.push_back("asin");
	math_func_list.push_back("atan");
	math_func_list.push_back("atan2");
	math_func_list.push_back("ceil");
	math_func_list.push_back("cos");
	math_func_list.push_back("cosh");
	math_func_list.push_back("exp");
	math_func_list.push_back("fabs");
	math_func_list.push_back("floor");
	math_func_list.push_back("fmod");
	math_func_list.push_back("frexp");
	math_func_list.push_back("ldexp");
	math_func_list.push_back("log");
	math_func_list.push_back("log10");
	math_func_list.push_back("modf");
	math_func_list.push_back("pow");
	math_func_list.push_back("sin");
	math_func_list.push_back("sinh");
	math_func_list.push_back("sqrt");
	math_func_list.push_back("tan");
	math_func_list.push_back("tanh");
	math_func_list.push_back("acos");
	math_func_list.push_back("acosh");
	math_func_list.push_back("asinh");
	math_func_list.push_back("atanh");
	math_func_list.push_back("cbrt");
	math_func_list.push_back("copysign");
	math_func_list.push_back("erf");
	math_func_list.push_back("erfc");
	math_func_list.push_back("exp2");
	math_func_list.push_back("expm1");
	math_func_list.push_back("fdim");
	math_func_list.push_back("fma");
	math_func_list.push_back("fmax");
	math_func_list.push_back("fmin");
	math_func_list.push_back("hypot");
	math_func_list.push_back("ilogb");
	math_func_list.push_back("lgamma");
	math_func_list.push_back("llrint");
	math_func_list.push_back("lrint");
	math_func_list.push_back("llround");
	math_func_list.push_back("lround");
	math_func_list.push_back("log1p");
	math_func_list.push_back("log2");
	math_func_list.push_back("logb");
	math_func_list.push_back("nan");
	math_func_list.push_back("nearbyint");
	math_func_list.push_back("nextafter");
	math_func_list.push_back("nexttoward");
	math_func_list.push_back("remainder");
	math_func_list.push_back("remquo");
	math_func_list.push_back("rint");
	math_func_list.push_back("round");
	math_func_list.push_back("scalbln");
	math_func_list.push_back("scalbn");
	math_func_list.push_back("tgamma");
	math_func_list.push_back("trunc");

	trig_func_list.push_back("cos");
	trig_func_list.push_back("cosh");
	trig_func_list.push_back("sin");
	trig_func_list.push_back("sinh");
	trig_func_list.push_back("tan");
	trig_func_list.push_back("tanh");
	trig_func_list.push_back("acos");
	trig_func_list.push_back("acosh");
	trig_func_list.push_back("asinh");
	trig_func_list.push_back("atanh");
	trig_func_list.push_back("asin");
	trig_func_list.push_back("atan");
	trig_func_list.push_back("atan2");

	log_func_list.push_back("log");
	log_func_list.push_back("log10");
	log_func_list.push_back("log1p");
	log_func_list.push_back("log2");
	log_func_list.push_back("logb");

	cmplx_preproc_list.push_back("import");
	cmplx_preproc_list.push_back("if");
	cmplx_preproc_list.push_back("else");
	cmplx_preproc_list.push_back("elif");
	cmplx_preproc_list.push_back("endif");
	cmplx_preproc_list.push_back("define");
	cmplx_preproc_list.push_back("undef");
	cmplx_preproc_list.push_back("error");
	cmplx_preproc_list.push_back("warning");
	cmplx_preproc_list.push_back("line");
	cmplx_preproc_list.push_back("region");
	cmplx_preproc_list.push_back("endregion");
}

CCsharpHtmlCounter::CCsharpHtmlCounter()
{
	classtype = CSHARP_HTML;
	language_name = "C#/HTML";

	file_extension.clear();
	file_extension.push_back(".*cs");
}

CCsharpAspCounter::CCsharpAspCounter()
{
	classtype = CS_ASP_S;
	language_name = "C#/ASPNET";

	file_extension.clear();
	file_extension.push_back(".*csasps");
}
